/*
 * @version: 1.1.1
 * @Date: 2022-05-25 09:13:12
 * @LastEditors: 杨慢慢
 * @LastEditTime: 2023-10-17 18:12:04
 * @Description: 
 */

import 'package:flutter/material.dart';
import 'package:happy_elf_app/store/common.dart';
import 'package:happy_elf_app/store/space.dart';
import 'package:happy_elf_app/store/user.dart';
// 引入第三方
export 'package:provider/provider.dart';
import 'package:provider/provider.dart'
    show MultiProvider, ChangeNotifierProvider;

// 分模块引入
import 'home.dart';

class Store {
  static Widget init(child) {
    return MultiProvider(
      providers: [
        ChangeNotifierProvider(create: (_) => Common()),
        ChangeNotifierProvider(create: (_) => HomeData()),
        ChangeNotifierProvider(create: (_) => SpaceData()),
        ChangeNotifierProvider(create: (_) => UserData()),
      ],
      child: child,
    );
  }
}
